<template>
	<view>
		<u-popup :show="show"  mode="bottom" :closeable="true" :round="10" @close="close">
		   <view class="popDialog">
			   
		      <view class="font-32 text-bold title">修改设备名称</view>
		      <view class="boxPanel flex-between">
		        <view class="text-bold">设备名称</view>
		        <input type="text" placeholder="请输入设备名称" v-model="name" placeholder-class="inputs" class="text-right">
		      </view>
			  
			  
			  
			  <view style="height: 120rpx;"></view>
		      <view class="footer fixfooter" >
		      	<view class="submit" @click="confirm">确定</view>
		      </view>
			  
			 
			  
		   </view>
		 </u-popup>
	</view>
</template>

<script>
	export default {
		name:"editEquipmentName",
		props: {
		  show: {
		    type: Boolean,
		    default: false
		  },
		 
		},
		data() {
			return {
				name: ''
			};
		},
		methods: {
			close() {
				this.$emit("close")
			},
			confirm() {
				if(this.name == '') {
					uni.showToast({
					    title: '请输入设备名称',
					    icon: 'none'
					});
					return
				}
				this.$emit("confirm", this.name)
			},
		}
	}
</script>

<style lang="scss" scoped>
.popDialog {
  width: 100%;
  padding: 40rpx 0;
  border-radius: 20rpx 20rpx 0 0;
  box-sizing: border-box;
  background: $color-bg;
  .title {
    text-align: center;
    padding-bottom: 38rpx;
  }
  .boxPanel {
    .inputs {
      font-size: 28rpx;
      color: #B5B9C7;
    }
    .txt {
      font-size: 32rpx;
      font-weight: bold;
    }
  }
}

.footer2 {
	 display: flex;
	 justify-content: space-between;
	 align-items: center;
	 padding: 0 24rpx;
	 box-sizing: border-box;
	 .submit {
	   width: 265rpx;
	   height: 86rpx;
	   line-height: 86rpx;
	   text-align: center;
	   background-color: $color-title2;
	   color: #fff;
	   border-radius: 40rpx;
	 }
}
</style>